<ul class="sysnav">
    <li>
        <img height="28px" src="{{base_url('syslib/sysimages/tk/120x60.png')}}"/>
    </li>
    <li><span>Website</span>
        <ul class="l">
            <li><a href="{{base_url('admin-planners/settings/settings2')}}">Setting</a></li>
            <li><a href="{{base_url('admin-planners/content')}}">Pages Content</a></li>
            
        </ul>
    </li>
    <li><span>Gallery</span>
        <ul class="l">
            <li><a href="{{base_url('admin-planners/video_climb')}}">Video</a></li>
            <li><a href="{{base_url('admin-planners/slider')}}">Slider</a></li>
            <li><a href="{{base_url('admin-planners/gallery')}}">Gallery</a></li>
        </ul>
    </li>
    <li><span>Tour - History</span>
        <ul class="l">
            <li><a href="{{base_url('admin-planners/tour')}}">Tour</a></li>
            <li><a href="{{base_url('admin-planners/tourhistory')}}">Registration</a></li>
        </ul>
    </li>
    <li><span>Commercial/Personal</span>
        <ul class="l">
            <li><a href="{{base_url('admin-planners/commercial')}}">Commercial</a></li>
            <li><a href="{{base_url('admin-planners/personal')}}">Personal</a></li>
        </ul>
    </li>
    <li><span>Product</span>
        <ul class="l">
            <li><a href="{{base_url('admin-planners/product')}}">Products</a></li>
            <li><a href="{{base_url('admin-planners/package')}}">Package</a></li>
        </ul>
    </li>
    <li><span>Orders</span>
        <ul class="l">
            <li><a href="{{base_url('APanel/order')}}">Product & Package</a></li>
            <li><a href="{{base_url('APanel/ordertour')}}">Tour</a></li>
        </ul>
    </li>
    <li><a href="{{base_url('admin-planners/contact')}}">Contact</a></li>
    
</ul>
<ul class="sysnav" style="right: 0px">
    {{if isset($_SESSION["ADP"]["USER"])}}
        <li class="fr"><a href="{{base_url('admin-planners/guide')}}">Helper</a></li>
        <li><a href="{{base_url('APanel/user')}}">User Manager</a></li>
        <li>
            <img class="pa t2 l8 w24px" src="{{$_SESSION["ADP"]["USER"]["Picture"]}}"/>
            <span style="padding-left: 44px">{{$_SESSION["ADP"]["USER"]["Name"]}}</span>
            <ul class="r">
                <li><a href="{{base_url('admin-planners/authority/MyAuthority')}}">My Authority</a></li>
                <li><a href="JavaScript:ChangeMyPassWord()">Change my password</a></li>
                <li><a href="{{base_url("OAuth/home/logout")}}">Logout</a></li>
            </ul>
        </li>
    {{else}}
        <li><a href="{{base_url('admin-planners')}}">Login</a></li>
    {{/if}}
    
</ul>
    <div id="frmchangemypassword" class="hidden">
        <table class="pt20 pl20 pb20 pr20">
            <tr>
                <td class="pr12">Current Password</td>
                <td>
                    <input type="password" class="classic-input"
                    name="txtcurrentpassword" id="txtcurrentpassword"/>
                </td>
            </tr>
            <tr>
                <td class="pr12">New Password</td>
                <td>
                    <input type="password" class="classic-input"
                    name="txtnewpassword" id="txtnewpassword"/>
                </td>
            </tr>
        </table>
    </div>
<script>
    function ChangeMyPassWord(){
        ShowConfirmDialogMessage($("#frmchangemypassword"), "Change your password", function(){
            if(isrunning) return;
            if(!_FcheckFilled($("#txtcurrentpassword").val())){
                $("#txtcurrentpassword").focus();
                return;
            }
            if(!_FcheckFilled($("#txtnewpassword").val())){
                $("#txtnewpassword").focus();
                return;
            }
            var url = "{{base_url()}}OAuth/home/changepassword/940cc81cec5c7e119162e62bd57710f0"
            var data={
                currentpass : $("#txtcurrentpassword").val(),
                newpass : $("#txtnewpassword").val()
            }
            isrunning=true;
            jqxAjax(url,data,function(result){
                isrunning=false;
                try{
                    if(result.code<0){
                        ShowErrorDialogMessage(result.msg);
                    }else{
                        CloseConfirmDialogMessage($("#frmchangemypassword"));
                        ShowErrorDialogMessage(result.msg);
                    }
                }catch(e){                                    
                    $(".error").html(e.message);
                }
            });
        });
    }
</script>